﻿<UserControl x:Class="Views.CredentialProviderView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="328" Width="518">
    <UserControl.Resources>
        <Style x:Key="ButtonFocusVisual">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Rectangle SnapsToDevicePixels="true" Margin="3" Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <LinearGradientBrush x:Key="ButtonNormalBackgroundFill" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFFFFFFF" Offset="0"/>
            <GradientStop Color="#FFE3EBF3" Offset="0.5"/>
            <GradientStop Color="#FFD0DCEB" Offset="0.5"/>
            <GradientStop Color="#FFA6B8CF" Offset="1"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="ButtonBorder" Color="#FF2B4F82"/>
        <Style x:Key="closeBUtton" BasedOn="{x:Null}" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <Rectangle
								Opacity="1"
								RadiusX="2"
								RadiusY="2"
								Stroke="#ffffff"
								StrokeThickness="1">
                                <Rectangle.Fill>
                                    <LinearGradientBrush
										StartPoint="0.6190476190476191,-0.5"
										EndPoint="1.1128888811383928,1.426776123046875">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStopCollection>
                                                <GradientStop
													Color="#FF000000"
													Offset="0" />
                                                <GradientStop
													Color="#FFffffff"
													Offset="1" />
                                            </GradientStopCollection>
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Path
								Margin="5,5,5,5"
								Stretch="Fill"
								Opacity="1"
								Data="M 808.8311767578125,278.7662353515625 C808.8311767578125,278.7662353515625 820,268 820,268 "
								Stroke="#ffffff"
								StrokeThickness="2" />
                            <Path
								Margin="5,5,5,5"
								Stretch="Fill"
								Opacity="1"
								Data="M 809.4155883789062,268.3636474609375 C809.4155883789062,268.3636474609375 820,279 820,279 "
								Stroke="#ffffff"
								StrokeThickness="2" />
                            <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True"/>
                            <Trigger Property="IsDefaulted" Value="True"/>
                            <Trigger Property="IsMouseOver" Value="True"/>
                            <Trigger Property="IsPressed" Value="True"/>
                            <Trigger Property="IsEnabled" Value="False"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="themeBUtton" BasedOn="{x:Null}" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <Rectangle
								Opacity="1"
								RadiusX="2"
								RadiusY="2"
								Stroke="#ffffff"
								StrokeThickness="1">
                                <Rectangle.Fill>
                                    <LinearGradientBrush
										StartPoint="0.6190476190476191,-0.5"
										EndPoint="1.1128888811383928,1.426776123046875">
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStopCollection>
                                                <GradientStop
													Color="#FF000000"
													Offset="0" />
                                                <GradientStop
													Color="#FFffffff"
													Offset="1" />
                                            </GradientStopCollection>
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <ContentPresenter Margin="5" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True"/>
                            <Trigger Property="IsDefaulted" Value="True"/>
                            <Trigger Property="IsMouseOver" Value="True"/>
                            <Trigger Property="IsPressed" Value="True"/>
                            <Trigger Property="IsEnabled" Value="False"/>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Storyboard x:Key="startAnimation">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.5" KeySpline="0,0,0.042,0.906"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.628"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1.364" KeySpline="0,0,0.042,0.906"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.96"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.628"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1.323" KeySpline="0,0,0.042,0.906"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.96"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource startAnimation}"/>
        </EventTrigger>
    </UserControl.Triggers>
    <Border BorderBrush="{x:Null}" BorderThickness="2,2,2,2" Padding="45" CornerRadius="8" x:Name="border" RenderTransformOrigin="0.5,0.5">
        <Border.RenderTransform>
            <TransformGroup>
                <ScaleTransform ScaleX="1" ScaleY="1"/>
                <SkewTransform AngleX="0" AngleY="0"/>
                <RotateTransform Angle="0"/>
                <TranslateTransform X="0" Y="0"/>
            </TransformGroup>
        </Border.RenderTransform>
        <Border.Background>
            <ImageBrush ImageSource="pack://application:,,,/Hinshelwood.TFSStickyBuddy;component/Resources/Images/NotImplementedBG.png" />
        </Border.Background>
        <DockPanel>
            <Button DockPanel.Dock="Top" HorizontalAlignment="Right" Style="{DynamicResource closeBUtton}" VerticalAlignment="Top" Width="21" Height="20" Content="" Name="Button1" />
            <Border DockPanel.Dock="Bottom" Background="{DynamicResource BackgroundBrush}" x:Name="Footer" Opacity="0.8" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,0,1,1" CornerRadius="0,0,5,5">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                    <Button Style="{DynamicResource themeBUtton}" Foreground="White"  Margin="0,0,20,0" IsEnabled="True" IsDefault="True" Name="ux_OKButton">OK</Button>
                    <Button Style="{DynamicResource themeBUtton}" Foreground="White" IsCancel="True" Name="ux_CancelButton">Cancel</Button>
                </StackPanel>
            </Border>
            <StackPanel>
                <TextBlock FontSize="30" FontWeight="Normal" FontFamily="Segoe UI" Foreground="#FFF8F6F6" Text="Login" VerticalAlignment="Top" />
                <Border BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,1,1,1">
                    <Grid Margin="0,0,0,0" x:Name="ContentGrid" Background="{DynamicResource InputBackgroundBrush}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Label Name="ServerConnectLabel" Content="Connect to {0}" HorizontalAlignment="Left" VerticalAlignment="Top"  Grid.Row="0" Margin="10,0,0,0" Foreground="#FFB5C8D8" />
                        <Grid HorizontalAlignment="Stretch" x:Name="ServersStackPanel" Grid.Row="0" VerticalAlignment="Stretch" Margin="20,30,20,20">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="30*" />
                                <ColumnDefinition Width="70*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Label Foreground="#FFF8F6F6" Grid.Column="0" Grid.Row="0">Username</Label>
                            <TextBox Foreground="#FFF8F6F6" Text="{Binding SelectedCredentials.Username}" Grid.Column="1" Grid.Row="0" AutoWordSelection="True" Width="Auto" Name="ux_UsernameTextbox"></TextBox>
                            <Label Foreground="#FFF8F6F6" Grid.Column="0" Grid.Row="1">Password</Label>
                            <PasswordBox Foreground="#FFF8F6F6" Grid.Column="1" Grid.Row="1" Name="ux_PasswordTextbox">
                                
                            </PasswordBox>
                        </Grid>
                        <GridSplitter IsEnabled="False" HorizontalAlignment="Stretch" Grid.Row="1" VerticalAlignment="Bottom" Height="1" Background="#FF3D4976" Margin="2,0,2,0"/>
                    </Grid>
                </Border>
            </StackPanel>
        </DockPanel>
    </Border>
</UserControl>
